<?php
/**
 * Joomla! 1.5 component ArticleCashRewards
 *
 * @version $Id: view.html.php 2009-05-10 01:47:01 svn $
 * @author Maverick
 * @package views.process
 * @subpackage ArticleCashRewards
 * @license GNU/GPL
 * Website: http://www.boddunan.com
 *
 * Review and approve the articles and assign points and cash rewards.
 * Users can see their articles and the points/cash rewards assigned in the front-end module.
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

// Import Joomla! libraries
jimport( 'joomla.application.component.view');
class ArticleCashRewardsViewProcess extends JView {
	
	function display($tpl = null) {

		global $mainframe, $acr_config;
		JToolBarHelper::title("&nbsp;&nbsp;&nbsp;&nbsp;" . JText::_('Assign Points & Cash').': <small><small>[ ' . JText::_('CPANEL_APPROVE') .' ]</small></small>', 'acr-48.png');
		JToolBarHelper::save();
		JToolBarHelper::cancel();

		$user		=& JFactory::getUser();
		$document	=& JFactory::getDocument();
		$dispatcher	=& JDispatcher::getInstance();
		$cid 		= JRequest::getVar( 'cid', 0, '', 'INTEGER' );
		$redirect = JRequest::getVar( 'redirect', 1, '', 'INTEGER');
		
		$model 		=& $this->getModel();
		$article	=& $model->getArticle($cid);
		$article->redirect = $redirect;
		
		$params = JComponentHelper::getParams('com_articlecashrewards');
		$this->assignRef('params', $params);
		
		$this->assignRef('article', $article);
		$this->assignRef('acr_config', $acr_config);
		parent::display($tpl);
	}
}
?>